#include "thread.hpp"
#include <iostream>

namespace rocket
{
thread::~thread()
{
    
}
thread::thread()
:_id(0)
{

}
void thread::start()
{
    pthread_create(&_id,NULL,thread::door,this);
}
void *thread::door(void *arg)
{
    thread *p=(thread *)arg;
    p->_f();
    return NULL;
}

void thread::join()
{
    pthread_join(_id, NULL);
}

}
